package com.young.shop.pojo.entity;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 *	积分实体类
 */

public class Points {

	private Long id;
	@ApiModelProperty(value = "用户名")
	private String userName;
	@ApiModelProperty(value = "积分详情(积分来源)")
	private String pointsDetails;
	@ApiModelProperty(value = "可用积分")
	private Integer pointsAvailable;
	@ApiModelProperty(value = "本次签到（消费）的积分（增加，减少）")
	private Integer pointsChanges;
	@ApiModelProperty(value = "操作时间")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	@Override
	public String toString() {
		return "Points{" +
				"id=" + id +
				", userName='" + userName + '\'' +
				", pointsDetails='" + pointsDetails + '\'' +
				", pointsAvailable=" + pointsAvailable +
				", pointsChanges=" + pointsChanges +
				", updateTime=" + updateTime +
				'}';
	}

	public Points(Long id, String userName,
				  String pointsDetails,
				  Integer pointsAvailable,
				  Integer pointsChanges,
				  Date updateTime) {
		this.id = id;
		this.userName = userName;
		this.pointsDetails = pointsDetails;
		this.pointsAvailable = pointsAvailable;
		this.pointsChanges = pointsChanges;
		this.updateTime = updateTime;
	}

	public Points() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPointsDetails() {
		return pointsDetails;
	}

	public void setPointsDetails(String pointsDetails) {
		this.pointsDetails = pointsDetails;
	}

	public Integer getPointsAvailable() {
		return pointsAvailable;
	}

	public void setPointsAvailable(Integer pointsAvailable) {
		this.pointsAvailable = pointsAvailable;
	}

	public Integer getPointsChanges() {
		return pointsChanges;
	}

	public void setPointsChanges(Integer pointsChanges) {
		this.pointsChanges = pointsChanges;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
